package com.corpgovernment.organization.controller.budget;

import com.corpgovernment.api.organization.soa.resident.GenBudgetRequestBO;
import com.corpgovernment.common.base.JSONResult;
import com.corpgovernment.organization.service.budget.BudgetCountService;
import com.corpgovernment.organization.service.budget.BudgetCountServicev1;
import com.corpgovernment.organization.service.budget.BudgetStatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("budgetCount")
@RestController
@Slf4j
public class BudgetCountController {

    @Autowired
    private BudgetCountService budgetCountService;
    @Autowired
    private BudgetCountServicev1 budgetCountServicev1;
    @Autowired
    private BudgetStatisticsService budgetStatisticsService;

    @RequestMapping("count")
    public JSONResult<Object> count (@RequestBody GenBudgetRequestBO request) {
        return budgetStatisticsService.count(request);
    }

    @RequestMapping("sendEmail")
    public JSONResult<Object> sendEmail () {
        return budgetCountServicev1.sendEmail();
    }


}
